package com.financing.platform.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.financing.platform.dto.FpPaymentDTO;
import com.financing.platform.dto.OrderByGaiZaoDTO;

public interface IPaymentService {
	/**
	 * 
	 * @Title: insertPayment
	 * @Description: 支付流水
	 * @param FpPaymentDTO
	 * @throws SQLException   
	 * @return int   
	 * @throws
	 */
	public int insertPayment(FpPaymentDTO paymentDTO) throws SQLException;

	/**
	 * 
	 * @Title: loadByOrderId
	 * @Description: 根据参数查询订单id
	 * @param FpPaymentDTO
	 * @throws SQLException   
	 * @return FpPaymentDTO   
	 * @throws
	 */
	public FpPaymentDTO loadByOrderId(Map<String,String> map) throws SQLException;

	/**
	 * 
	 * @Title: updatePayment
	 * @Description: 修改流水状态
	 * @param FpPaymentDTO
	 * @throws SQLException   
	 * @throws
	 */
	public void updatePayment(FpPaymentDTO paymentUp)throws SQLException;
	
	/**
	 * 
	 * @Title: queryPaymentList
	 * @Description: 根据参数查询订单id
	 * @param FpPaymentDTO
	 * @throws SQLException   
	 * @return FpPaymentDTO   
	 * @throws
	 */
	public List<FpPaymentDTO> queryPaymentList(FpPaymentDTO paymentUp) throws SQLException;
	
	/**
	 * @param paymentDTO
	 * @return
	 * @throws SQLException
	 */
	public int queryPaymentListCount(FpPaymentDTO paymentDTO) throws SQLException;
	
	
	/**
	 * 根据(有单提现表)参数查询支付流水
	 * @param platSerialNo  支付流水号
	 * @return
	 * @throws SQLException
	 */
	public List<FpPaymentDTO> loadByAmountDetail(String associationId,String amountType) throws SQLException;
	
	/**
	 * 注：事物控制
	 * 根据(有单提现表)参数修改支付流水
	 * @param platSerialNo  支付流水号
	 * @param paymentDTO  修改的对象  (payStatus 2:成功；3：失败   )
	 * 	BizEnums.PayEnums.PAY_STATUS_SUCC;//成功
	 *	BizEnums.PayEnums.PAY_STATUS_FAIL;//失败
	 * @return
	 * @throws SQLException
	 */
	public void updateByAmountDetail(String platSerialNo,FpPaymentDTO paymentDTO) throws SQLException;
	
	
	public void addPaymentForOrderRebate(OrderByGaiZaoDTO orderDTO,OrderByGaiZaoDTO orderTmp, String paymentStatus) throws SQLException;
	
	public void addPaymentForOrderBackRebate(OrderByGaiZaoDTO orderDTO,OrderByGaiZaoDTO orderTmp, String paymentStatus) throws SQLException;
}
